package main

import (
	"fmt"
)

func main() {
	fs := [5]func(){}
	for _, i := range []int{0, 1, 2, 3, 4} {
		fmt.Println(i)
		defer fmt.Println("1111", i)
		defer func() {
			fmt.Println("22222", i)
		}()
		fs[i] = func() {
			fmt.Println("closuer i", i)
		}
	}

	for _, i := range fs {
		i()
	}
}
